</key>
</schema>
+ <schema id="org.gnome.shell.app-switcher"
+ path="/org/gnome/shell/app-switcher/"
+ gettext-domain="@GETTEXT_PACKAGE@">
+ <key type="b" name="current-workspace-only">
+ <default>false</default>
+ <summary>Limit switcher to current workspace.</summary>
+ <description>
+ If true, only applications that have windows on the current workspace are shown in the switcher.
+ Otherwise, all applications are included.
+ </description>
+ </key>
+ </schema>
+
<enum id="org.gnome.shell.window-switcher.AppIconMode">
<value value="1" nick="thumbnail-only"/>
<value value="2" nick="app-icon-only"/>
this._arrows = [];
let windowTracker = Shell.WindowTracker.get_default();
+ let settings = new Gio.Settings({ schema: 'org.gnome.shell.app-switcher' });
+ let workspace = settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace()
+ : null;
let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL,
- global.screen, null);
+ global.screen, workspace);
// Construct the AppIcons, add to the popup
for (let i = 0; i < apps.length; i++) {
appIcon.cachedWindows = allWindows.filter(function(w) {
return windowTracker.get_window_app (w) == appIcon.app;
});
- this._addIcon(appIcon);
+ if (workspace == null || appIcon.cachedWindows.length > 0) {
+ this._addIcon(appIcon);
+ }
}
this._curApp = -1;